﻿using System;
using System.Collections.Generic;
using System.Text;

using System.Windows.Forms;
using System.Runtime.InteropServices;

namespace NGE
{
    [StructLayout(LayoutKind.Sequential)]
    public struct SystemMessage
    {
        public Message msg;
        public IntPtr hWnd;
        public IntPtr wParam;
        public IntPtr lParam;
        public uint time;
        public System.Drawing.Point p;
    }
    [Serializable]
    public enum KeyboardHandleMode
    {
        DirectInput,
        SystemMessage,
    }
    
    [Serializable]
    public enum DrawMode
    {
        GPU,
        CPU,
    }
    [Serializable]
    public enum KeyboardState
    {
        KeyUp,
        KeyDown,
        KeyHold,
    }
    [Serializable]
    public enum GamepadState
    {
        ButtonDown,
        ButtonHold,
        ButtonUp,
    }
    [Serializable]
    public enum MouseState
    {
        Move,
        LButtonDown,
        LButtonHold,
        LButtonUp,
        RButtonDown,
        RButtonHold,
        RButtonUp,
    }
    public delegate void KeyboardEvent(object sender, int key, KeyboardState ks);
    public delegate void GamepadEvent(object sender, int btn, GamepadState gs);
    public delegate void MouseEvent(object sender, int x, int y, MouseState ms);
    public delegate void FormBoxEvent(object sender, object arg);
    public delegate void ButtonBoxEvent(object sender, object arg);
    public delegate void TextBoxEvent(object sender, object arg);
    public delegate void InputerEvent(object sender, object arg);
    [Serializable]
    public enum Direction
    {
        /// <summary>
        /// 上
        /// </summary>
        U = 0,
        /// <summary>
        /// 下
        /// </summary>
        L = 1,
        /// <summary>
        /// 左
        /// </summary>
        D = 2,
        /// <summary>
        /// 右
        /// </summary>
        R = 3,
    }
}
